# Copyright (c) 2023 by RisingLeaf (https://github.com/RisingLeaf)
#
# Endless Sky is free software: you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later version.
#
# Endless Sky is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <https://www.gnu.org/licenses/>.

# Weapons:
outfit "Plasma Discharger"
	category "Guns"
	cost 140000
	mass 25
	"outfit space" -20
	"weapon capacity" -20
	"gun ports" -1
	thumbnail "outfit/plasma discharger"
	weapon
		sprite "projectile/plasma discharge"
		sound "plasma discharger"
		"hit effect" "blaster impact"
		"submunition" "plasma particle" 5
		"inaccuracy" 8
		"velocity" 10
		"lifetime" 64
		"random lifetime" 12
		"reload" 40
		"firing energy" 60
		"firing heat" 30
		"shield damage" 33
		"hull damage" 39
		"minable damage" 90
	description "The Incipias started to mine asteroids long before they began intrasystem travel due to the proximity of their home world's atmosphere to its rings. As a result this mining tool seems to be more advanced than their general technology, yet it is still not comparable to the efficiency of human weapons."
	description "	The discharger itself shoots bolts of high density plasma that split up into small particles after some time. Because of the plasma infuser the fire rate is exceptional, but the energy usage is severe."

outfit "plasma particle"
	weapon
		sprite "effect/plasma particle"
		"hit effect" "blaster impact"
		"lifetime" 60
		"random velocity" 2
		"inaccuracy" 20
		"shield damage" 6.6
		"hull damage" 7.8
		"minable damage" 18

outfit "Stagnation Beam"
	category "Turrets"
	cost 180000
	mass 30
	"outfit space" -30
	"weapon capacity" -30
	"turret mounts" -1
	thumbnail "outfit/stagnation beam"
	licenses
		"Hicemus Conflict"
	weapon
		sprite "projectile/stagnation beam"
			"random start frame"
			"frame rate" 6
		"hardpoint sprite" "hardpoint/stagnation beam"
		sound "stagnation beam"
		"hit effect" "stagnation beam impact"
		"inaccuracy" .5
		"turret turn" 3
		"velocity" 600
		"lifetime" 1
		"reload" 1
		"firing energy" 0.5
		"firing heat" 3.2
		# Deal damage to provoke ships.
		"shield damage" 0.1
		"hull damage" 0.1
		"hit force" -40
		"slowing damage" 0.1
	description "The Stagnation Beam is one of the few technologies of the Incipias that surpasses anything humanity has made thus far - in fact, the first prototypes were built before the Incipias even dreamed of space travel. The weapon's origins lie in giant reactors that were constructed to pull asteroids out of their home planet's orbit, providing easy access to more resources. Naturally, a mechanism to slow the asteroids down was also implemented to prevent accidental asteroid strikes."
	description "	As the Incipias' mastery of spaceflight grew, so did the generators' efficiency, which allowed for more compact, ship-based tractor beams. Resource collection was greatly streamlined by these new models, much to the benefit of the Incipias' otherwise sluggish ships."
	description "	The secret of how these beams work is only known to a few scientists of the Incipias who are under the control of the state. Such knowledge, if made public, could have disastrous consequences for the Hicemus and their grip on power."

effect "stagnation beam impact"
	sprite "effect/stagnation beam impact"
		"no repeat"
		"frame rate" 30
	"lifetime" 5
	"random angle" 2
	"velocity scale" -.005

outfit "Star Tail"
	category "Secondary Weapons"
	cost 320000
	mass 48
	"outfit space" -50
	"weapon capacity" -50
	"gun ports" -1
	thumbnail "outfit/star tail launcher"
	"star tail capacity" 20
	licenses
		"Hicemus Conflict"
	weapon
		sprite "projectile/star tail upload"
			"frame rate" 10
			"no repeat"
		sound "star tail"
		"hit effect" "blaster impact"
		"velocity" 1
		"lifetime" 58
		"reload" 180
		"firing energy" 60
		"firing heat" 30
		"shield damage" 820
		"hull damage" 860
		"range override" 3000
		
		# To make the AI fire even if the ship is not directly in front.
		"homing" 1
		"optical tracking" 1
		"turn" 0.5

		ammo "Star Tail Cell"
		"submunition" "Star Tail Projectile" 1
	description "Little to no information about this weapon has ever been made public. Rumors are that it shoots highly volatile plasma chunks."
	description "	Captains that have used this weapon say that its projectiles could change direction mid-flight, and were able to follow their targets despite attempts by their victims to dodge the shots."

outfit "Star Tail Projectile"
	weapon
		sprite "projectile/star tail"
			"frame rate" 12
		"hit effect" "star tail hit"
		"live effect" "star tail live" 120
		"velocity" 1
		acceleration 5
		drag .2
		"lifetime" 120
		"shield damage" 410
		"hull damage" 430
		"homing" 1
		"optical tracking" 1
		"turn" .5

effect "star tail hit"
	sprite "effect/star tail hit"
		"no repeat"
		"frame rate" 40
	sound "explosion small"
	"lifetime" 30
	"velocity scale" 0.

effect "star tail live"
	sprite "effect/star tail live"
		"no repeat"
		"frame rate" 28
	"lifetime" 15
	"velocity scale" 0.

outfit "Star Tail Cell"
	category "Ammunition"
	cost 1500
	thumbnail "outfit/star tail cell"
	"mass" .1
	"star tail capacity" -1
	licenses
		"Hicemus Conflict"
	description "The Star Tail needs an extreme amount of energy that the Incipias are not able to create in a short amount of time. To accommodate this, the Star Tail Cell contains an energy-rich substance that releases its energy when fired. One of these cells holds enough energy to fire exactly one shot."

outfit "Star Tail Storage"
	category "Ammunition"
	cost 6000
	thumbnail "outfit/star tail cell storage"
	"mass" 10
	"outfit space" -10
	"star tail capacity" 20
	licenses
		"Hicemus Conflict"
	description "Because Star Tail Cells are highly volatile, they need a robust storage system. This radial design is able to withstand minor explosions by using a variant of a shield that can be deployed temporarily."
	description "	One layer of this easily expandable system is already shipped with the gun itself. To increase storage space, more layers are simply stacked on top."

outfit "Horizon Grappler"
	category "Turrets"
	cost 200000
	thumbnail "outfit/horizon grappler"
	"mass" 25
	"outfit space" -25
	"weapon capacity" -25
	"turret mounts" -1
	weapon
		"hardpoint sprite" "hardpoint/horizon grappler"
		"hardpoint offset" 0.
		sound "tractor beam"
		"hit effect" "horizon grappler"
		"tractor beam" 9
		"velocity" 400
		"lifetime" 1
		"reload" 1
		"firing energy" 3.2
		"firing heat" 1.1
	description `The pinnacle of Incipian technology is represented by this mining utility. Perfected over centuries, this tractor beam is far beyond anything the Incipias have developed so far. The beam's name originates from its first prototypes developed before the advent of spaceflight, which gathered minerals by pulling asteroids from their homeworld's rings into its atmosphere.`

effect "horizon grappler"
	sprite "effect/horizon grappler"
		"frame rate" 3.5
	"lifetime" 1
	"velocity scale" 1

# Shields/Energy:
outfit "Gas-Class Shield"
	category "Systems"
	thumbnail "outfit/gas class shield"
	cost 136000
	mass 60
	"outfit space" -60
	"shield generation" .1
	"energy generation" 4.2
	"heat generation" 5
	"shield fuel" .01
	description "Shield technology is one of the most recent developments of the Incipias. While this shield appears similar to a human shield device, it works on a completely different basis. In its core hydrogen is burned, providing energy for regeneration. This proved so effective that it became the main power source of all of their ships."

outfit "Liquid-Class Shield"
	category "Systems"
	thumbnail "outfit/liquid class shield"
	cost 216000
	mass 80
	"outfit space" -90
	"shield generation" .25
	"energy generation" 6.1
	"heat generation" 6
	"shield fuel" .02
	description "This more advanced shield generator burns a liquid instead of a gas. This raises the efficiency considerably but also requires more space, making this outfit popular only on larger ships."

outfit "Metallic Hydrogen Cell"
	category "Power"
	thumbnail "outfit/metallic hydrogen cell"
	cost 2500
	mass 20
	"outfit space" -20
	"energy capacity" 500
	description "Hydrogen energy storage was discovered early by the Incipias because of the great amount of metallic hydrogen on their homeworld. Because Incipias ships usually access their energy at the time it is produced, only a small amount of storage is needed. Most of their ships have only one cell installed as a consequence."

# Engines:
outfit "MH Blue-Class Thruster"
	category "Engines"
	thumbnail "outfit/mh blue-class thruster"
	cost 32000
	mass 27
	"outfit space" -27
	"engine capacity" -27
	"flare sprite" "effect/incipias flare/metallic hydrogen small"
		"frame rate" 24
	"flare sound" "incip plasma small"
	"thrust" 24
	"thrusting energy" 2
	"thrusting heat" 2.5
	description "In Incipian culture, blue is the weakest color. A thruster labeled as blue does not bode well for the speed of any ship using it."

outfit "MH Blue-Class Steering"
	category "Engines"
	thumbnail "outfit/mh blue-class steering"
	cost 28000
	mass 24
	"outfit space" -24
	"engine capacity" -24
	"turn" 498
	"turning energy" 1.
	"turning heat" 3
	description "This steering barely provides the minimum force needed to turn a ship, but it is still used often because of how cheap it is."

outfit "MH Green-Class Thruster"
	category "Engines"
	thumbnail "outfit/mh green-class thruster"
	cost 44000
	mass 32
	"outfit space" -32
	"engine capacity" -32
	"flare sprite" "effect/incipias flare/metallic hydrogen medium"
		"frame rate" 24
	"flare sound" "incip plasma med"
	"thrust" 30
	"thrusting energy" 2.2
	"thrusting heat" 2.8
	description "Green is a color of balance for the Incipias. This thruster balances the need for space with the need for powerful engines."

outfit "MH Green-Class Steering"
	category "Engines"
	thumbnail "outfit/mh green-class steering"
	cost 35000
	mass 28
	"outfit space" -28
	"engine capacity" -28
	"turn" 618
	"turning energy" 1.1
	"turning heat" 3.1
	description "The Incipias seem to have something against turning their ships. Even though this steering is supposed to be an upgrade from the Blue-Class steering, it is barely an improvement."

outfit "MH Red-Class Thruster"
	category "Engines"
	thumbnail "outfit/mh red-class thruster"
	cost 50000
	mass 41
	"outfit space" -41
	"engine capacity" -41
	"flare sprite" "effect/incipias flare/metallic hydrogen large"
		"frame rate" 24
	"flare sound" "incip plasma large"
	"thrust" 48
	"thrusting energy" 5
	"thrusting heat" 10
	description "The abundance of metallic hydrogen on the Incipias home planet has led to the development of engines that utilize this potent source of energy, allowing for more efficient thrusters than what might be expected given the Incipias' short history of spaceflight."

outfit "MH Red-Class Steering"
	category "Engines"
	thumbnail "outfit/mh red-class steering"
	cost 49000
	mass 41
	"outfit space" -41
	"engine capacity" -41
	"turn" 1134
	"turning energy" 2.5
	"turning heat" 12
	description "Even the Incipias realize that ships need to turn towards their target to be able to shoot it. This steering is specifically designed for combat, but captains with a lot of money find it very useful for mining."


# Hand to Hand
outfit "Cloud Piercer"
	category "Hand to Hand"
	cost 10000
	thumbnail "outfit/cloud piercer"
	licenses
		"Hicemus Conflict"
	"capture attack" .55
	"capture defense" 1.5
	"unplunderable" 1
	description "When it comes to close combat, the Incipias are formidable opponents. This brutal weapon may not be the best to invade another ship with, but when it comes to defending, it quite literally shreds enemies."

# Special
outfit "Hicemus Conflict License"
	category "Licenses"
	description "The Hicemus have trusted you enough to give you this license, allowing a glimpse at their most precious technology - technology that is meant to give them an advantage over other factions."
